package com.windbell.rest.controllers

import edu.fudan.langlab.xtendannotation.restservice.NgService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod
import org.springframework.web.bind.annotation.RestController
import com.windbell.rest.services.RestResult
import static com.windbell.rest.services.RestUtil.*
import com.windbell.rest.services.CCHospitalService
import com.windbell.rest.shared.hospital.UICCHospital
import java.util.Collection

@RestController
@NgService
class CCHospitalController {
	@Autowired CCHospitalService hospitalService
	@RequestMapping("/windbell/hospitals")
	def RestResult<Collection<UICCHospital>> getHospitalList() {
		callWithResult[
			return hospitalService.getHospitalList()
		]
	}
}